﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace DataWorks_Sqlite.Migrations
{
    public partial class InitialCreate : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "dw_props_admin",
                columns: table => new
                {
                    key = table.Column<int>(type: "INTEGER", nullable: false)
                        .Annotation("Sqlite:Autoincrement", true),
                    clean_numreg = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    clean_stringreg = table.Column<string>(type: "TEXT", maxLength: 64, nullable: false),
                    spike_meanpoints = table.Column<int>(type: "INTEGER", nullable: false),
                    spike_vairancepoints = table.Column<int>(type: "INTEGER", nullable: false),
                    spike_threadspercentage = table.Column<double>(type: "REAL", nullable: false),
                    mileagebasis = table.Column<int>(type: "INTEGER", nullable: false),
                    spike_ratio = table.Column<double>(type: "REAL", nullable: false),
                    cleanthreadnumber = table.Column<int>(type: "INTEGER", nullable: false),
                    continuouscount = table.Column<int>(type: "INTEGER", nullable: false),
                    ismultithreads = table.Column<int>(type: "INTEGER", nullable: false),
                    samplerate = table.Column<int>(type: "INTEGER", nullable: false),
                    gpsreductiontimes = table.Column<int>(type: "INTEGER", nullable: false),
                    lastingpoints = table.Column<byte>(type: "INTEGER", nullable: false),
                    throttlezerostandard = table.Column<byte>(type: "INTEGER", nullable: false),
                    steeringzerostandard = table.Column<byte>(type: "INTEGER", nullable: false),
                    predictthreadnumber = table.Column<int>(type: "INTEGER", nullable: false),
                    spdfromtoresamplerate = table.Column<int>(type: "INTEGER", nullable: false),
                    binnumber = table.Column<int>(type: "INTEGER", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dw_props_admin", x => x.key);
                });

            migrationBuilder.CreateTable(
                name: "dw_props_clean",
                columns: table => new
                {
                    key = table.Column<int>(type: "INTEGER", nullable: false)
                        .Annotation("Sqlite:Autoincrement", true),
                    gpsspdidx = table.Column<int>(type: "INTEGER", nullable: false),
                    canspdidx = table.Column<int>(type: "INTEGER", nullable: false),
                    loginname = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    vehicle = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    project = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    ecnumber = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    originaldatapath = table.Column<string>(type: "TEXT", maxLength: 1000, nullable: false),
                    savedatapath = table.Column<string>(type: "TEXT", maxLength: 1000, nullable: false),
                    selecteddirectory = table.Column<string>(type: "TEXT", maxLength: 2000, nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dw_props_clean", x => x.key);
                });

            migrationBuilder.CreateTable(
                name: "dw_props_convertcsvi",
                columns: table => new
                {
                    key = table.Column<int>(type: "INTEGER", nullable: false)
                        .Annotation("Sqlite:Autoincrement", true),
                    loginname = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    vehicle = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    project = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    ecnumber = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    originaldatapath = table.Column<string>(type: "TEXT", maxLength: 1000, nullable: false),
                    savedatapath = table.Column<string>(type: "TEXT", maxLength: 1000, nullable: false),
                    selecteddirectory = table.Column<string>(type: "TEXT", maxLength: 2000, nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dw_props_convertcsvi", x => x.key);
                });

            migrationBuilder.CreateTable(
                name: "dw_props_datapredict",
                columns: table => new
                {
                    key = table.Column<int>(type: "INTEGER", nullable: false)
                        .Annotation("Sqlite:Autoincrement", true),
                    matfilepath = table.Column<string>(type: "TEXT", maxLength: 2000, nullable: false),
                    matfilename = table.Column<string>(type: "TEXT", maxLength: 2000, nullable: false),
                    lowpass = table.Column<double>(type: "REAL", nullable: false),
                    usefilter = table.Column<int>(type: "INTEGER", nullable: false),
                    causalorder = table.Column<int>(type: "INTEGER", nullable: false),
                    uncausalorder = table.Column<int>(type: "INTEGER", nullable: false),
                    loginname = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    vehicle = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    project = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    ecnumber = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    originaldatapath = table.Column<string>(type: "TEXT", maxLength: 1000, nullable: false),
                    savedatapath = table.Column<string>(type: "TEXT", maxLength: 1000, nullable: false),
                    selecteddirectory = table.Column<string>(type: "TEXT", maxLength: 2000, nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dw_props_datapredict", x => x.key);
                });

            migrationBuilder.CreateTable(
                name: "dw_props_datapredict_lstm",
                columns: table => new
                {
                    key = table.Column<int>(type: "INTEGER", nullable: false)
                        .Annotation("Sqlite:Autoincrement", true),
                    onnxfilepath = table.Column<string>(type: "TEXT", maxLength: 2000, nullable: false),
                    scalerpath = table.Column<string>(type: "TEXT", maxLength: 2000, nullable: false),
                    loginname = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    vehicle = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    project = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    ecnumber = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    originaldatapath = table.Column<string>(type: "TEXT", maxLength: 1000, nullable: false),
                    savedatapath = table.Column<string>(type: "TEXT", maxLength: 1000, nullable: false),
                    selecteddirectory = table.Column<string>(type: "TEXT", maxLength: 2000, nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dw_props_datapredict_lstm", x => x.key);
                });

            migrationBuilder.CreateTable(
                name: "dw_props_halfhourcombine",
                columns: table => new
                {
                    key = table.Column<int>(type: "INTEGER", nullable: false)
                        .Annotation("Sqlite:Autoincrement", true),
                    loginname = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    vehicle = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    project = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    ecnumber = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    originaldatapath = table.Column<string>(type: "TEXT", maxLength: 1000, nullable: false),
                    savedatapath = table.Column<string>(type: "TEXT", maxLength: 1000, nullable: false),
                    selecteddirectory = table.Column<string>(type: "TEXT", maxLength: 2000, nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dw_props_halfhourcombine", x => x.key);
                });

            migrationBuilder.CreateTable(
                name: "dw_props_linearconvert",
                columns: table => new
                {
                    key = table.Column<int>(type: "INTEGER", nullable: false)
                        .Annotation("Sqlite:Autoincrement", true),
                    damagedidx = table.Column<int>(type: "INTEGER", nullable: false),
                    goodidx = table.Column<int>(type: "INTEGER", nullable: false),
                    k = table.Column<double>(type: "REAL", nullable: false),
                    b = table.Column<double>(type: "REAL", nullable: false),
                    loginname = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    vehicle = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    project = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    ecnumber = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dw_props_linearconvert", x => x.key);
                });

            migrationBuilder.CreateTable(
                name: "dw_props_mileagecalculation",
                columns: table => new
                {
                    key = table.Column<int>(type: "INTEGER", nullable: false)
                        .Annotation("Sqlite:Autoincrement", true),
                    loginname = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    originaldatapath = table.Column<string>(type: "TEXT", maxLength: 1000, nullable: false),
                    spdchanname = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    odochanname = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dw_props_mileagecalculation", x => x.key);
                });

            migrationBuilder.CreateTable(
                name: "dw_props_mileagecombine",
                columns: table => new
                {
                    key = table.Column<int>(type: "INTEGER", nullable: false)
                        .Annotation("Sqlite:Autoincrement", true),
                    spdname = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    loginname = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    vehicle = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    project = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    ecnumber = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    originaldatapath = table.Column<string>(type: "TEXT", maxLength: 1000, nullable: false),
                    savedatapath = table.Column<string>(type: "TEXT", maxLength: 1000, nullable: false),
                    selecteddirectory = table.Column<string>(type: "TEXT", maxLength: 2000, nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dw_props_mileagecombine", x => x.key);
                });

            migrationBuilder.CreateTable(
                name: "dw_props_spikeremove",
                columns: table => new
                {
                    key = table.Column<int>(type: "INTEGER", nullable: false)
                        .Annotation("Sqlite:Autoincrement", true),
                    spikechanidx = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    combinedpath = table.Column<string>(type: "TEXT", maxLength: 1000, nullable: false),
                    loginname = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    vehicle = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    project = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    ecnumber = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    originaldatapath = table.Column<string>(type: "TEXT", maxLength: 1000, nullable: false),
                    savedatapath = table.Column<string>(type: "TEXT", maxLength: 1000, nullable: false),
                    selecteddirectory = table.Column<string>(type: "TEXT", maxLength: 2000, nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dw_props_spikeremove", x => x.key);
                });

            migrationBuilder.CreateTable(
                name: "dw_props_txtcombine",
                columns: table => new
                {
                    key = table.Column<int>(type: "INTEGER", nullable: false)
                        .Annotation("Sqlite:Autoincrement", true),
                    loginname = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    vehicle = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    project = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    ecnumber = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    originaldatapath = table.Column<string>(type: "TEXT", maxLength: 1000, nullable: false),
                    savedatapath = table.Column<string>(type: "TEXT", maxLength: 1000, nullable: false),
                    selecteddirectory = table.Column<string>(type: "TEXT", maxLength: 2000, nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dw_props_txtcombine", x => x.key);
                });

            migrationBuilder.CreateTable(
                name: "dw_props_unify",
                columns: table => new
                {
                    key = table.Column<int>(type: "INTEGER", nullable: false)
                        .Annotation("Sqlite:Autoincrement", true),
                    odpath = table.Column<string>(type: "TEXT", maxLength: 1000, nullable: false),
                    cleanedpath = table.Column<string>(type: "TEXT", maxLength: 1000, nullable: false),
                    txtcombpath1st = table.Column<string>(type: "TEXT", maxLength: 1000, nullable: false),
                    selecteddate = table.Column<string>(type: "TEXT", maxLength: 2000, nullable: false),
                    spikechanidx = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    spikedpath = table.Column<string>(type: "TEXT", maxLength: 1000, nullable: false),
                    matfilepath = table.Column<string>(type: "TEXT", maxLength: 2000, nullable: false),
                    matfilename = table.Column<string>(type: "TEXT", maxLength: 2000, nullable: false),
                    lowpass = table.Column<double>(type: "REAL", nullable: false),
                    usefilter = table.Column<int>(type: "INTEGER", nullable: false),
                    causalorder = table.Column<int>(type: "INTEGER", nullable: false),
                    uncausalorder = table.Column<int>(type: "INTEGER", nullable: false),
                    predictpath = table.Column<string>(type: "TEXT", maxLength: 1000, nullable: false),
                    txtcombpath2ed = table.Column<string>(type: "TEXT", maxLength: 1000, nullable: false),
                    loginname = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    vehicle = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    project = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    ecnumber = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dw_props_unify", x => x.key);
                });

            migrationBuilder.CreateTable(
                name: "dw_props_user_halfhourimport",
                columns: table => new
                {
                    key = table.Column<int>(type: "INTEGER", nullable: false)
                        .Annotation("Sqlite:Autoincrement", true),
                    remarks = table.Column<string>(type: "TEXT", maxLength: 1000, nullable: false),
                    savepath = table.Column<string>(type: "TEXT", maxLength: 1000, nullable: false),
                    inputpath = table.Column<string>(type: "TEXT", maxLength: 1000, nullable: false),
                    chantitle_spd = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    chantitle_throttle = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    chantitle_brake = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    brakezerostandard = table.Column<byte>(type: "REAL", nullable: false),
                    chantitle_steering = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    chantitle_engspd = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    chantitle_accybody = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    importgps = table.Column<byte>(type: "REAL", nullable: false),
                    importspd = table.Column<byte>(type: "REAL", nullable: false),
                    importstatistic = table.Column<byte>(type: "REAL", nullable: false),
                    importsteering = table.Column<byte>(type: "REAL", nullable: false),
                    importengrpm = table.Column<byte>(type: "REAL", nullable: false),
                    importspdfromto = table.Column<byte>(type: "REAL", nullable: false),
                    loginname = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    vehicle = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    project = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    ecnumber = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dw_props_user_halfhourimport", x => x.key);
                });

            migrationBuilder.CreateTable(
                name: "dw_props_user_mileageimport",
                columns: table => new
                {
                    key = table.Column<int>(type: "INTEGER", nullable: false)
                        .Annotation("Sqlite:Autoincrement", true),
                    remarks = table.Column<string>(type: "TEXT", maxLength: 1000, nullable: false),
                    savepath = table.Column<string>(type: "TEXT", maxLength: 1000, nullable: false),
                    inputpath = table.Column<string>(type: "TEXT", maxLength: 1000, nullable: false),
                    chantitle_spd = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    loginname = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    vehicle = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    project = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    ecnumber = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dw_props_user_mileageimport", x => x.key);
                });

            migrationBuilder.CreateTable(
                name: "dw_sysauthority",
                columns: table => new
                {
                    key = table.Column<uint>(type: "INTEGER", nullable: false)
                        .Annotation("Sqlite:Autoincrement", true),
                    loginname = table.Column<string>(type: "TEXT", maxLength: 64, nullable: false),
                    password = table.Column<string>(type: "TEXT", maxLength: 64, nullable: false),
                    authoritykey = table.Column<int>(type: "REAL", nullable: false),
                    avatarpath = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dw_sysauthority", x => x.key);
                });

            migrationBuilder.CreateTable(
                name: "dw_systemversion",
                columns: table => new
                {
                    key = table.Column<int>(type: "INTEGER", nullable: false)
                        .Annotation("Sqlite:Autoincrement", true),
                    version = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
                    details = table.Column<string>(type: "TEXT", maxLength: 1000, nullable: false),
                    commit = table.Column<string>(type: "TEXT", maxLength: 1000, nullable: false),
                    updatetime = table.Column<DateTime>(type: "datetime", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_dw_systemversion", x => x.key);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "dw_props_admin");

            migrationBuilder.DropTable(
                name: "dw_props_clean");

            migrationBuilder.DropTable(
                name: "dw_props_convertcsvi");

            migrationBuilder.DropTable(
                name: "dw_props_datapredict");

            migrationBuilder.DropTable(
                name: "dw_props_datapredict_lstm");

            migrationBuilder.DropTable(
                name: "dw_props_halfhourcombine");

            migrationBuilder.DropTable(
                name: "dw_props_linearconvert");

            migrationBuilder.DropTable(
                name: "dw_props_mileagecalculation");

            migrationBuilder.DropTable(
                name: "dw_props_mileagecombine");

            migrationBuilder.DropTable(
                name: "dw_props_spikeremove");

            migrationBuilder.DropTable(
                name: "dw_props_txtcombine");

            migrationBuilder.DropTable(
                name: "dw_props_unify");

            migrationBuilder.DropTable(
                name: "dw_props_user_halfhourimport");

            migrationBuilder.DropTable(
                name: "dw_props_user_mileageimport");

            migrationBuilder.DropTable(
                name: "dw_sysauthority");

            migrationBuilder.DropTable(
                name: "dw_systemversion");
        }
    }
}
